//
//  UIButton+Extension.swift
//  LVWeibo
//
//  Created by lv on 15/7/1.
//  Copyright © 2015年 lv. All rights reserved.
//

import UIKit

extension UIButton {
    
    convenience init(btnTitle: String,imageName: String,fontSize: CGFloat){
        self.init()
        
        setTitle(btnTitle, forState: UIControlState.Normal)
        setImage(UIImage(named: imageName), forState: UIControlState.Normal)
        setTitleColor(UIColor.blackColor(), forState: UIControlState.Normal)
        titleLabel?.font = UIFont.systemFontOfSize(fontSize)
    }
    convenience init(btnTitle: String,titleColor: UIColor = UIColor.blackColor(),fontSize: CGFloat,btnBackgroundColor:UIColor = UIColor(white: 0.75, alpha: 1.0)){
        self.init()
        backgroundColor = btnBackgroundColor
        setTitle(btnTitle, forState: UIControlState.Normal)
        setTitleColor(titleColor, forState: UIControlState.Normal)
        titleLabel?.font = UIFont.systemFontOfSize(fontSize)
    }

}
